<!DOCTYPE html>
<html lang="en">
<head>
<%include'admin/header.html'%>
</head>
<body class="layui-layout-body" layadmin-themealias="dark-blue">
<div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
       <%include'admin/nav.html'%>
        <div class="layui-body" id="LAY_app_body">
            <div class="layadmin-tabsbody-item layui-show">
                <div class="layui-fluid"><%block content%><%endblock%></div>
            </div>
        </div>
        <div class="layui-clear"></div>
    </div>
</div>
<%include'admin/footer.html'%>
<script>
    layui.link('/static/css/common.css?t=' + Math.random());
    layui.link('/static/css/admin.css?t=' + Math.random());
    layui.config({base: '../../../../static/layui/lay/extend/'}).extend({
        notice: 'notice',
        tableMerge: 'tableMerge',
        index: 'index',
    });
    layui.use(["index","admin", "carousel"], function () {
        var e = layui.$, t = (layui.admin, layui.carousel), a = layui.element, i = layui.device();
        e(".layadmin-carousel").each(function () {
            var a = e(this);
            t.render({
                elem: this,
                width: "100%",
                arrow: "none",
                interval: a.data("interval"),
                autoplay: a.data("autoplay") === !0,
                trigger: i.ios || i.android ? "click" : "hover",
                anim: a.data("anim")
            })
        });
    }),
    layui.use(['notice', 'tableMerge',"index",'echarts','admin'], function () {
        var $ = layui.jquery, element = layui.element, layer = layui.layer, table = layui.table, form = layui.form,
        notice = layui.notice, carousel = layui.carousel, laydate = layui.laydate,tableMerge=layui.tableMerge,
        laytpl = layui.laytpl,admin=layui.admin, device = layui.device(),echarts = layui.echarts,upload=layui.upload;
        <% block script %><% endblock %>
        <% for message in get_flashed_messages() %>
            notice.warning('<< message >>')
        <% endfor %>
        $('.restart_sever').click(function () {
           $.ajax({url:"<< url_for('admin.RestartSever') >>",dataType:'json',success:function (data) {
                   if(data.status==0){notice.info('重启成功');if($('#pid_status').length >0){setTimeout(function(){table.reload('pid_status')},2000)};}else{notice.warning(data.msg);}
              },error:function () {
                   notice.error('网络异常')
               }
           });
            var par=$(this).parent('dd');
            if(par){
                par.removeClass('layui-this')
            }
        });
    });
</script>
</body></html>